package com.gege.homework10.service.impl;

import com.gege.homework10.service.OrderService;
import com.gege.mapper.OrderMapper;
import com.gege.model.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gechenpeng
 * @date 2021-05-22
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public Order saveOrder(Order order) {
        orderMapper.insert(order);
        return order;
    }

    @Override
    public Order findOrderById(Long id) {
        return orderMapper.selectById(id);
    }
}
